package Alex.applogic2;

import Alex.applogic.SearchHelper;
import Alex.model.Search;


public class SearchHelper2 extends DriverBasedHelper implements SearchHelper {

	public SearchHelper2(ApplicationManager2 manager) {
	    super(manager.getWebDriver());
	  }
	

	public void clearFilter(){
		pages.internalPage.setSearchFilter("");
	} 
	
	public void filterIs(Search search){
		pages.internalPage.ensurePageLoaded()
			.setSearchFilter(search.getFilter());		
	}


	@Override
	public boolean movieIsFound() {
		// TODO Auto-generated method stub
		if(pages.internalPage.moviesFound()){
			return true;
		};		
		return false;
	}


	@Override
	public boolean movieIsNotFound() {
		// TODO Auto-generated method stub
		if(pages.internalPage.noMoviesFound()){
			return true;
		};		
		return false;
		
	}
	
}
